<?php
/**
 * Created by PhpStorm.
 * User: adminstrator
 * Date: 2018/2/8
 * Time: 16:35
 */
header("Content-type:text/html;charset=utf-8");
date_default_timezone_set('PRC');
include_once("./Db_pdo.class1.php");
echo '<pre>';
$DB1=new Db_pdo("newcxh","admin","2018126");


$s = file_get_contents('./ss.txt');
$arr = array();
$sss =array();
$d = explode("\r\n",$s);
foreach($d as $value){
	$temp = str_replace(" ","", str_replace("[id] => ", "",$value));
	if(is_numeric($temp)){
		$arr[] = $temp;
		// print_r($temp . "\r\n");
	}
}

foreach ($arr as $key1 => $value1) {
	$sql = 'select pay_points,id from cxh_users where user_id='.$value1;
  
   $data= $DB1->new_query($sql);

	$data = $data->fetchAll(PDO::FETCH_ASSOC); 
	$sss[] = $data[0];

}
// file_put_contents('ppp.txt',serialize($sss));
// print_r($sss);


















// $sql = 'select us.*,fx.lv as lves from cxh_users as us left join fx_user as fx on fx.uid = us.user_id';
// $cxhusers = $DB1->new_query($sql);
// $cxhusers = $cxhusers->fetchAll(PDO::FETCH_ASSOC);  

// print_r($cxhusers);
// $car_sql = 'select count(1) as days,sum(pay_back) as money,sum(no_back) as no_money from back_buy where status=0 group by buying_id limit 999999';

// $csql = $DB1->new_query($car_sql);
// $car_buy = $csql->fetchAll(PDO::FETCH_ASSOC);  
// echo '<pre>';
// print_r($car_buy);








